<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/mytags.jsp"%>
<html>
<head>

<%@ include file="/common/easyui.jsp"%>
<%@ include file="/common/jquery-zTree.jsp"%>

<script type="text/javascript">
	function load(){
		$.getJSON("${ctx}/adminManage/sys/autoDbTable/loadTable.do",{
			dbId:'${param.dbId}',
			tableName:autoDbTableForm.tableName.value
		},function(json) {
			alert(json.obj);
		});
	}
</script>
<link rel="stylesheet" href="${ctx}/plug-in/Validform/css/style.css" type="text/css"/>
<link rel="stylesheet" href="${ctx}/plug-in/Validform/css/tablefrom.css" type="text/css"/>
</head>

<body class="easyui-layout">
<form action="" method="post" name="autoDbTableForm">
<div region="north" title="数据库表管理" border="false" style="height: 200px">
	<table class="formtable">
		<tr>
			<td width="15%" align="right"><label class="Validform_label">表名：</label></td>
			<td width="35%" class="value">
				<input type="text" name="tableName" />
				<input type="button" value="加载" onclick="load()"/>
			</td>
			<td width="15%" align="right"><label class="Validform_label">表描述：</label></td>
			<td width="35%" class="value" colspan="3"><input type="text" name="tableComments" /> </td>
		</tr>
		<tr>
			<td align="right"><label class="Validform_label">类名：</label></td>
			<td class="value">
				<input type="text" name="className" />
			</td>
			<td align="right"><label class="Validform_label">模板：</label></td>
			<td class="value">
				<input type="text" name="templateId" />
			</td>
		</tr>
		<tr>
			<td align="right"><label class="Validform_label">主键数：</label></td>
			<td class="value">
				<input type="text" name="tablePkNum" />
			</td>
			<td align="right"><label class="Validform_label">主键名：</label></td>
			<td class="value">
				<input type="text" name="tablePkName" />
			</td>
		</tr>
		<tr>
			<td align="right"><label class="Validform_label">主键类型：</label></td>
			<td class="value">
				<input type="text" name="tablePkType" />
			</td>
			<td align="right"><label class="Validform_label">主键取值：</label></td>
			<td class="value">
				<input type="text" name="tablePkValue" />
			</td>
		</tr>
	</table>
</div>
<div region="center" border="false">
	<table id="dataTable" class="easyui-datagrid" title="数据库字段" style="width:100%;height:100%">
		<thead>
            <tr>
                <th data-options="field:'sqlColumnName'">字段名称</th>
                <th data-options="field:'sqlRemarks'">字段描述</th>
                <th data-options="field:'sqlDataType'">字段类型</th>
                <th data-options="field:'sqlColumnSize'">字段长度</th>
                <th data-options="field:'sqlNullAble'">是否允许为空</th>
                <th data-options="field:'status'">Status</th>
            </tr>
        </thead>
	</table>
</div>	
</form>
</body>
</html>